import java.util.List;

public class Text {

    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();

        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(11);
        mySingleList.addLast(10);

        mySingleList.removeAllKey(1);

        mySingleList.display();
    }

    public static void main3(String[] args) {
        MySingleList mySingleList = new MySingleList();

        mySingleList.addFirst(1);
//        mySingleList.addFirst(1);
//        mySingleList.addFirst(1);
//        mySingleList.addFirst(1);
//        mySingleList.addFirst(1);
//        mySingleList.addFirst(2);
//        mySingleList.addFirst(3);
//        mySingleList.addFirst(4);
//
//        mySingleList.addLast(18);
//        mySingleList.addLast(12);
//        mySingleList.addLast(11);
//
//        mySingleList.addIndex(0,29);
//        mySingleList.addIndex(1,1000);
        mySingleList.remove(1);

        mySingleList.display();

//        mySingleList.remove(29);
//        mySingleList.remove(1000);
//        mySingleList.remove(1);
//        mySingleList.remove(11);
//
//        mySingleList.display();

//        mySingleList.removeAllKey(1);
//
//        mySingleList.display();

//        mySingleList.clear();
//
//        mySingleList.display();


    }

    public static void main2(String[] args) {
        MySingleList mySingleList = new MySingleList();

        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(2);
        mySingleList.addFirst(3);
        mySingleList.addFirst(4);

        mySingleList.addLast(18);
        mySingleList.addLast(12);
        mySingleList.addLast(11);

        mySingleList.addIndex(0,29);
        mySingleList.addIndex(1,1000);

        mySingleList.display();

        mySingleList.remove(29);
        mySingleList.remove(1000);
        mySingleList.remove(1);

        mySingleList.display();

        mySingleList.removeAllKey(1);

        mySingleList.display();

    }

    public static void main1(String[] args) {
        LinkedList mylinklist = new LinkedList();
        mylinklist.addFirst(1);
        mylinklist.addFirst(1);
        mylinklist.addFirst(1);
        mylinklist.addFirst(1);
        mylinklist.addFirst(12);
        mylinklist.addFirst(3);
        mylinklist.addFirst(4);
        mylinklist.addLast(999);
        mylinklist.addLast(99);
        mylinklist.addLast(9);

        mylinklist.addIndex(2,200);
        //mylinklist.remove(1);
        mylinklist.removeAllKey(1);

        mylinklist.display();

//        mylinklist.clear();
//
//        mylinklist.display();

    }
}
